Portable electronic devices may be equipped with one or more sensors for measuring ambient light conditions. Traditionally, an ambient light sensor (ALS) or light meter is used to measure the overall amount of ambient light near a portion of the device. Based on the sensor output of the ALS sensor, a portable electronic device may control the brightness of a display or disable the operation of a touch interface. In a typical implementation, an ALS sensor includes a large-area photodiode or other type photoelectric detector that is configured to produce an electrical signal in response to light incident on the surface of the sensor. Traditionally, an ALS sensor is operated continuously to monitor and detect changes in ambient lighting conditions.
Portable electronic devices may also include a digital camera having an image sensor that can be used to record digital images and video. An image sensor typically comprises an array of sensor cells or sensor regions that can be used to produce an array of pixel values also referred to as a digital image. To conserve power and computing resources, an image sensor of a digital camera is typically operated intermittently, as necessary to record a digital image or video.
Traditionally, the ambient light sensor and the digital image sensor are separate sensors that are configured to perform distinctly different functions. However, in some cases a single sensor may perform the functionality of both the image sensor and the ambient light sensor. While using a single sensor potentially reduces the number of components in the device, the functionality of the single sensor may be limited as compared to a traditional ambient light sensor. For example, the field of view of a traditional image sensor may be many times smaller than a traditional ambient light sensor. The reduced field of view may lead to inconsistent or inaccurate results when computing an ambient light estimate using such an image sensor.
The systems and techniques described herein can be used to implement a single sensor as both a digital image sensor and an ambient light sensor. In particular, a digital image sensor can be adapted to measure ambient light conditions that correlate more closely to measurements taken using a traditional separate ambient light sensor.